package com.chinamobile.maps.util;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * @ClassName:   PropertyReader
 * @Description: TODO
 * @author:      frankwong
 * @date:        2012-6-4 下午6:13:17
 *
 */
public class PropertyReader {

	public final static String MONGODB_PROPERTY_PATH = "PropertiesFiles/mongodb.properties";
	/**
	 * @throws IOException 
	 * @throws FileNotFoundException 
	 * @Title:       main
	 * @Description: TODO
	 * @return:      void   
	 * @throws
	 */
	public static void main(String[] args) throws IOException {
		Properties prop = new Properties();// 属性集合对象  
		FileInputStream fis = new FileInputStream(MONGODB_PROPERTY_PATH);;// 属性文件输入流  
        prop.load(fis);// 将属性文件流装载到Properties对象中  
        fis.close();// 关闭流  
        System.out.println("获取属性值：ip=" + prop.getProperty("ip"));  
	}
}
